import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * ClassName: Java09_Object
 * Package: PACKAGE_NAME
 * DESCRIPTION:
 *
 * @Author 程翎钥
 * @Create 2024/4/9 16:26
 * @Version 1.0
 */
public class Java09_Object {
    public static void main(String[] args) throws ParseException {
        System.out.println(System.currentTimeMillis());
        Date d = new Date();
        System.out.println(d);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String dateformat = sdf.format(d);
        System.out.println(dateformat);
        String dateString = "2024-04-09";
        Date parse = sdf.parse(dateString);
        System.out.println(parse);
        //d.setTime(System.currentTimeMillis());
        d.getTime();
        System.out.println(parse.before(d));
        System.out.println(parse.after(d));




    }
}
